package com.itheima.commons;

/**
 * @author Tang
 * @date 2023/1/7
 */
public class BaseContext {
    private static final ThreadLocal<Long> THREAD_LOCAL =  new ThreadLocal<Long>();

    //设置值 员工id
    public static void setCurrentId(Long employeeId){
        THREAD_LOCAL.set(employeeId);
    }

    //取值  获取员工id
    public static Long getCurrentId() {
        return THREAD_LOCAL.get();
    }
}
